package com.gitee.ywj1352.user.controller;


import com.gitee.ywj1352.sharing.po.User;
import com.gitee.ywj1352.user.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    IUserService userService;

    @GetMapping("/user")
    public Long createUser(@RequestParam("username")String username){
        User user = new User();
        user.setUserName(username);
        return userService.addUser(user);
    }


}
